/* See FiraSans-LICENSE.txt for the Fira Sans license. */
@font-face {
	font-family: 'Fira Sans';
	font-style: normal;
	font-weight: 400;
	src: local('Fira Sans'),
		url("FiraSans-Regular.woff2") format("woff2"),
		url("FiraSans-Regular.woff") format('woff');
	font-display: swap;
}
@font-face {
	font-family: 'Fira Sans';
	font-style: normal;
	font-weight: 500;
	src: local('Fira Sans Medium'),
		url("FiraSans-Medium.woff2") format("woff2"),
		url("FiraSans-Medium.woff") format('woff');
	font-display: swap;
}

/* See SourceSerif4-LICENSE.md for the Source Serif 4 license. */
@font-face {
	font-family: 'Source Serif 4';
	font-style: normal;
	font-weight: 400;
	src: local('Source Serif 4'),
		url("SourceSerif4-Regular.ttf.woff2") format("woff2"),
		url("SourceSerif4-Regular.ttf.woff") format("woff");
	font-display: swap;
}
@font-face {
	font-family: 'Source Serif 4';
	font-style: italic;
	font-weight: 400;
	src: local('Source Serif 4 Italic'),
		url("SourceSerif4-It.ttf.woff2") format("woff2"),
		url("SourceSerif4-It.ttf.woff") format("woff");
	font-display: swap;
}
@font-face {
	font-family: 'Source Serif 4';
	font-style: normal;
	font-weight: 700;
	src: local('Source Serif 4 Bold'),
		url("SourceSerif4-Bold.ttf.woff2") format("woff2"),
		url("SourceSerif4-Bold.ttf.woff") format("woff");
	font-display: swap;
}

/* See SourceCodePro-LICENSE.txt for the Source Code Pro license. */
@font-face {
	font-family: 'Source Code Pro';
	font-style: normal;
	font-weight: 400;
	/* Avoid using locally installed font because bad versions are in circulation:
	 * see https://github.com/rust-lang/rust/issues/24355 */
	src: url("SourceCodePro-Regular.ttf.woff2") format("woff2"),
		url("SourceCodePro-Regular.ttf.woff") format("woff");
	font-display: swap;
}
@font-face {
	font-family: 'Source Code Pro';
	font-style: italic;
	font-weight: 400;
	src: url("SourceCodePro-It.ttf.woff2") format("woff2"),
		url("SourceCodePro-It.ttf.woff") format("woff");
	font-display: swap;
}
@font-face {
	font-family: 'Source Code Pro';
	font-style: normal;
	font-weight: 600;
	src: url("SourceCodePro-Semibold.ttf.woff2") format("woff2"),
		url("SourceCodePro-Semibold.ttf.woff") format("woff");
	font-display: swap;
}

/* Avoid using legacy CJK serif fonts in Windows like Batang */
@font-face {
	font-family: 'Noto Sans KR';
	src: url("noto-sans-kr-v13-korean-regular.woff") format("woff");
	font-display: swap;
	unicode-range: U+A960-A97F, U+AC00-D7AF, U+D7B0-D7FF;
}

* {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

/* This part handles the "default" theme being used depending on the system one. */
html {
	content: "";
}
@media (prefers-color-scheme: light) {
	html {
		content: "light";
	}
}
@media (prefers-color-scheme: dark) {
	html {
		content: "dark";
	}
}

/* General structure and fonts */

body {
	font: 16px/1.4 "Source Serif 4", "Noto Sans KR", serif;
	margin: 0;
	position: relative;
	padding: 10px 15px 20px 15px;

	-webkit-font-feature-settings: "kern", "liga";
	-moz-font-feature-settings: "kern", "liga";
	font-feature-settings: "kern", "liga";
}

h1 {
	font-size: 1.5em;
}
h2 {
	font-size: 1.4em;
}
h3 {
	font-size: 1.3em;
}
h1, h2, h3, h4 {
	font-weight: 500;
	margin: 20px 0 15px 0;
	padding-bottom: 6px;
}
h1.fqn {
	display: flex;
	border-bottom: 1px dashed;
	margin-top: 0;

	/* workaround to keep flex from breaking below 700 px width due to the float: right on the nav
	   above the h1 */
	padding-left: 1px;
}
h1.fqn > .in-band > a:hover {
	text-decoration: underline;
}
h2, h3, h4 {
	border-bottom: 1px solid;
}
h3.code-header, h4.code-header {
	font-size: 1em;
	font-weight: 600;
	border: none;
	padding: 0;
	margin: 0;
}
.impl,
.impl-items .method,
.methods .method,
.impl-items .type,
.methods .type,
.impl-items .associatedconstant,
.methods .associatedconstant,
.impl-items .associatedtype,
.methods .associatedtype {
	flex-basis: 100%;
	font-weight: 600;
	margin-top: 16px;
	margin-bottom: 10px;
	position: relative;
}
.impl, .method.trait-impl,
.type.trait-impl,
.associatedconstant.trait-impl,
.associatedtype.trait-impl {
	padding-left: 15px;
}

div.impl-items > div {
	padding-left: 0;
}

h1, h2, h3, h4,
.sidebar, a.source, .search-input, .search-results .result-name,
.content table td:first-child > a,
.item-left > a,
div.item-list .out-of-band, span.since,
#source-sidebar, #sidebar-toggle,
details.rustdoc-toggle > summary::before,
details.undocumented > summary::before,
div.impl-items > div:not(.docblock):not(.item-info),
.content ul.crate a.crate, a.srclink,
/* This selector is for the items listed in the "all items" page. */
#main > ul.docblock > li > a {
	font-family: "Fira Sans", Arial, sans-serif;
}

.content ul.crate a.crate {
	font-size: 16px/1.6;
}

ol, ul {
	padding-left: 25px;
}
ul ul, ol ul, ul ol, ol ol {
	margin-bottom: .6em;
}

p {
	margin: 0 0 .6em 0;
}

summary {
	outline: none;
}

/* Fix some style changes due to normalize.css 8 */

td,
th {
	padding: 0;
}

table {
	border-collapse: collapse;
}

button,
input,
optgroup,
select,
textarea {
	color: inherit;
	font: inherit;
	margin: 0;
}

/* end tweaks for normalize.css 8 */

details:not(.rustdoc-toggle) summary {
	margin-bottom: .6em;
}

code, pre, a.test-arrow, .code-header {
	font-family: "Source Code Pro", monospace;
}
.docblock code, .docblock-short code {
	border-radius: 3px;
	padding: 0 0.1em;
}
.docblock pre code, .docblock-short pre code {
	padding: 0;
}
pre {
	padding: 14px;
}
.type-decl pre {
	overflow-x: auto;
}

.source .content pre {
	padding: 20px;
}

img {
	max-width: 100%;
}

li {
	position: relative;
}

.source .content {
	margin-top: 50px;
	max-width: none;
	overflow: visible;
	margin-left: 0px;
}

nav.sub {
	font-size: 16px;
	text-transform: uppercase;
}

.sidebar {
	width: 200px;
	position: fixed;
	left: 0;
	top: 0;
	bottom: 0;
	overflow: auto;
}

/* Improve the scrollbar display on firefox */
* {
	scrollbar-width: initial;
}
.sidebar {
	scrollbar-width: thin;
}

/* Improve the scrollbar display on webkit-based browsers */
::-webkit-scrollbar {
	width: 12px;
}
.sidebar::-webkit-scrollbar {
	width: 8px;
}
::-webkit-scrollbar-track {
	-webkit-box-shadow: inset 0;
}

.sidebar .block > ul > li {
	margin-right: -10px;
}

.content, nav {
	max-width: 960px;
}

/* Everything else */

.hidden {
	display: none !important;
}

.logo-container {
	height: 100px;
	width: 100px;
	position: relative;
	margin: 20px auto;
	display: block;
	margin-top: 10px;
}

.logo-container > img {
	max-width: 100px;
	max-height: 100px;
	height: 100%;
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	display: block;
}

.sidebar .location {
	border: 1px solid;
	font-size: 17px;
	margin: 30px 10px 20px 10px;
	text-align: center;
	word-wrap: break-word;
	font-weight: inherit;
	padding: 0;
}

.sidebar .version {
	font-size: 15px;
	text-align: center;
	border-bottom: 1px solid;
	overflow-wrap: break-word;
	word-wrap: break-word; /* deprecated */
	word-break: break-word; /* Chrome, non-standard */
}

.location:empty {
	border: none;
}

.location a:first-of-type {
	font-weight: 500;
}
.location a:hover {
	text-decoration: underline;
}

.block {
	padding: 0;
	margin-bottom: 14px;
}
.block h2, .block h3 {
	text-align: center;
}
.block ul, .block li {
	margin: 0 10px;
	padding: 0;
	list-style: none;
}

.block a {
	display: block;
	text-overflow: ellipsis;
	overflow: hidden;
	line-height: 15px;
	padding: 7px 5px;
	font-size: 14px;
	font-weight: 300;
	transition: border 500ms ease-out;
}

.sidebar-title {
	border-top: 1px solid;
	border-bottom: 1px solid;
	text-align: center;
	font-size: 17px;
	margin-bottom: 5px;
	font-weight: inherit;
	padding: 0;
}

.sidebar-links {
	margin-bottom: 15px;
}

.sidebar-links > a {
	padding-left: 10px;
	width: 100%;
}

.sidebar-menu {
	display: none;
}

.content {
	padding: 15px 0;
}

.source .content pre.rust {
	white-space: pre;
	overflow: auto;
	padding-left: 0;
}

.rustdoc .example-wrap {
	display: inline-flex;
	margin-bottom: 10px;
}

.example-wrap {
	position: relative;
	width: 100%;
}

.example-wrap > pre.line-number {
	overflow: initial;
	border: 1px solid;
	padding: 13px 8px;
	text-align: right;
	border-top-left-radius: 5px;
	border-bottom-left-radius: 5px;
}

.example-wrap > pre.rust a:hover {
	text-decoration: underline;
}

.rustdoc:not(.source) .example-wrap > pre:not(.line-number) {
	width: 100%;
	overflow-x: auto;
}

.rustdoc .example-wrap > pre {
	margin: 0;
}

#search {
	margin-left: 230px;
	position: relative;
}

#results > table {
	width: 100%;
	table-layout: fixed;
}

.content > .example-wrap pre.line-numbers {
	position: relative;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}
.line-numbers span {
	cursor: pointer;
}

.docblock-short {
	overflow-wrap: anywhere;
}
.docblock-short p {
	display: inline;
}

.docblock-short p {
	overflow: hidden;
	text-overflow: ellipsis;
	margin: 0;
}
/* Wrap non-pre code blocks (`text`) but not (```text```). */
.docblock > :not(pre) > code,
.docblock-short > :not(pre) > code {
	white-space: pre-wrap;
}

.docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
	border-bottom: 1px solid;
}

.top-doc .docblock h1 { font-size: 1.3em; }
.top-doc .docblock h2 { font-size: 1.15em; }
.top-doc .docblock h3,
.top-doc .docblock h4,
.top-doc .docblock h5 {
	font-size: 1em;
}

.docblock h1 { font-size: 1em; }
.docblock h2 { font-size: 0.95em; }
.docblock h3, .docblock h4, .docblock h5 { font-size: 0.9em; }

.docblock {
	margin-left: 24px;
	position: relative;
}

.docblock > * {
	max-width: 100%;
	overflow-x: auto;
}

.content .out-of-band {
	flex-grow: 0;
	text-align: right;
	font-size: 23px;
	margin: 0px;
	padding: 0 0 0 12px;
	font-weight: normal;
}

.method > .code-header, .trait-impl > .code-header, .invisible > .code-header {
	max-width: calc(100% - 41px);
	display: block;
}

.invisible {
	width: 100%;
	display: inline-block;
}

.content .in-band {
	flex-grow: 1;
	margin: 0px;
	padding: 0px;
}

.in-band > code, .in-band > .code-header {
	display: inline-block;
}

#main {
	position: relative;
}
#main > .since {
	top: inherit;
	font-family: "Fira Sans", Arial, sans-serif;
}

.content table:not(.table-display) {
	border-spacing: 0 5px;
}
.content td { vertical-align: top; }
.content td:first-child { padding-right: 20px; }
.content td p:first-child { margin-top: 0; }
.content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; }
.content tr:first-child td { border-top: 0; }

.docblock table {
	margin: .5em 0;
	width: calc(100% - 2px);
	overflow-x: auto;
	display: block;
}

.docblock table td {
	padding: .5em;
	border: 1px dashed;
}

.docblock table th {
	padding: .5em;
	text-align: left;
	border: 1px solid;
}

.fields + table {
	margin-bottom: 1em;
}

.content .item-list {
	list-style-type: none;
	padding: 0;
}

.content .multi-column {
	-moz-column-count: 5;
	-moz-column-gap: 2.5em;
	-webkit-column-count: 5;
	-webkit-column-gap: 2.5em;
	column-count: 5;
	column-gap: 2.5em;
}
.content .multi-column li { width: 100%; display: inline-block; }

.content > .methods > .method {
	font-size: 1em;
	position: relative;
}
/* Shift "where ..." part of method or fn definition down a line */
.content .method .where,
.content .fn .where,
.content .where.fmt-newline {
	display: block;
	font-size: 0.8em;
}

.content .methods > div:not(.notable-traits):not(.method) {
	margin-left: 40px;
	margin-bottom: 15px;
}

.content .docblock > .impl-items {
	margin-left: 20px;
	margin-top: -34px;
}
.content .docblock >.impl-items .table-display {
	margin: 0;
}
.content .docblock >.impl-items table td {
	padding: 0;
}
.content .docblock > .impl-items .table-display, .impl-items table td {
	border: none;
}

.content .item-info code {
	font-size: 90%;
}

.content .item-info {
	position: relative;
	margin-left: 33px;
}

.sub-variant > div > .item-info {
	margin-top: initial;
}

.content .item-info::before {
	content: '⬑';
	font-size: 25px;
	position: absolute;
	top: -6px;
	left: -19px;
}

.content .impl-items .method, .content .impl-items > .type, .impl-items > .associatedconstant,
.impl-items > .associatedtype, .content .impl-items details > summary > .type,
.impl-items details > summary > .associatedconstant,
.impl-items details > summary > .associatedtype {
	margin-left: 20px;
}

.content .impl-items .docblock, .content .impl-items .item-info {
	margin-bottom: .6em;
}

.content .impl-items > .item-info {
	margin-left: 40px;
}

.methods > .item-info, .content .impl-items > .item-info {
	margin-top: -8px;
}

.impl-items {
	flex-basis: 100%;
}

#main > .item-info {
	margin-top: 0;
}

nav:not(.sidebar) {
	border-bottom: 1px solid;
	padding-bottom: 10px;
	margin-bottom: 10px;
}
nav.main {
	padding: 20px 0;
	text-align: center;
}
nav.main .current {
	border-top: 1px solid;
	border-bottom: 1px solid;
}
nav.main .separator {
	border: 1px solid;
	display: inline-block;
	height: 23px;
	margin: 0 20px;
}
nav.sum { text-align: right; }
nav.sub form { display: inline; }

nav.sub, .content {
	margin-left: 230px;
}

a {
	text-decoration: none;
	background: transparent;
}

.small-section-header {
	display: flex;
	justify-content: space-between;
	position: relative;
}

.small-section-header:hover > .anchor {
	display: initial;
}

.in-band:hover > .anchor, .impl:hover > .anchor, .method.trait-impl:hover > .anchor,
.type.trait-impl:hover > .anchor, .associatedconstant.trait-impl:hover > .anchor,
.associatedtype.trait-impl:hover > .anchor {
	display: inline-block;
	position: absolute;
}
.anchor {
	display: none;
	position: absolute;
	left: 0;
	background: none !important;
}
.anchor.field {
	left: -5px;
}
.small-section-header > .anchor {
	left: -15px;
	padding-right: 8px;
}
h2.small-section-header > .anchor {
	padding-right: 6px;
}
.anchor::before {
	content: '§';
}

.docblock a:not(.srclink):not(.test-arrow):hover,
.docblock-short a:not(.srclink):not(.test-arrow):hover, .item-info a {
	text-decoration: underline;
}

.invisible > .srclink,
.method > .code-header + .srclink {
	position: absolute;
	top: 0;
	right: 0;
	font-size: 17px;
	font-weight: normal;
}

.block a.current.crate { font-weight: 500; }

.item-table {
	display: grid;
	column-gap: 1.2rem;
	row-gap: 0.0rem;
	grid-template-columns: auto 1fr;
	/* align content left */
	justify-items: start;
}

.item-left, .item-right {
	display: block;
}
.item-left {
	grid-column: 1;
}
.item-right {
	grid-column: 2;
}

.search-container {
	position: relative;
}
.search-container > div {
	display: inline-flex;
	width: calc(100% - 63px);
}
#crate-search {
	min-width: 115px;
	margin-top: 5px;
	padding: 6px;
	padding-right: 19px;
	flex: none;
	border: 0;
	border-right: 0;
	border-radius: 4px 0 0 4px;
	outline: none;
	cursor: pointer;
	border-right: 1px solid;
	-moz-appearance: none;
	-webkit-appearance: none;
	/* Removes default arrow from firefox */
	text-indent: 0.01px;
	text-overflow: "";
	background-repeat: no-repeat;
	background-color: transparent;
	background-size: 20px;
	background-position: calc(100% - 1px) 56%;
}
.search-container > .top-button {
	position: absolute;
	right: 0;
	top: 10px;
}
.search-input {
	/* Override Normalize.css: we have margins and do
	 not want to overflow - the `moz` attribute is necessary
	 until Firefox 29, too early to drop at this point */
	-moz-box-sizing: border-box !important;
	box-sizing: border-box !important;
	outline: none;
	border: none;
	border-radius: 1px;
	margin-top: 5px;
	padding: 10px 16px;
	font-size: 17px;
	transition: border-color 300ms ease;
	transition: border-radius 300ms ease-in-out;
	transition: box-shadow 300ms ease-in-out;
	width: 100%;
}

#crate-search + .search-input {
	border-radius: 0 1px 1px 0;
	width: calc(100% - 32px);
}

.search-input:focus {
	border-radius: 2px;
	border: 0;
	outline: 0;
}

.search-results {
	display: none;
	padding-bottom: 2em;
}

.search-results.active {
	display: block;
	/* prevent overhanging tabs from moving the first result */
	clear: both;
}

.search-results .desc > span {
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
	display: block;
}

.search-results > a {
	display: block;
	width: 100%;
	/* A little margin ensures the browser's outlining of focused links has room to display. */
	margin-left: 2px;
	margin-right: 2px;
	border-bottom: 1px solid #aaa3;
}

.search-results > a > div {
	display: flex;
	flex-flow: row wrap;
}

.search-results .result-name, .search-results div.desc, .search-results .result-description {
	width: 50%;
}
.search-results .result-name {
	padding-right: 1em;
}

.search-results .result-name > span {
	display: inline-block;
	margin: 0;
	font-weight: normal;
}

body.blur > :not(#help) {
	filter: blur(8px);
	-webkit-filter: blur(8px);
	opacity: .7;
}

#help {
	width: 100%;
	height: 100vh;
	position: fixed;
	top: 0;
	left: 0;
	display: flex;
	justify-content: center;
	align-items: center;
}
#help > div {
	flex: 0 0 auto;
	box-shadow: 0 0 6px rgba(0,0,0,.2);
	width: 550px;
	height: auto;
	border: 1px solid;
}
#help dt {
	float: left;
	clear: left;
	display: block;
	margin-right: 0.5rem;
}
#help span.top, #help span.bottom {
	text-align: center;
	display: block;
	font-size: 18px;

}
#help span.top {
	text-align: center;
	display: block;
	margin: 10px 0;
	border-bottom: 1px solid;
	padding-bottom: 4px;
	margin-bottom: 6px;
}
#help span.bottom {
	clear: both;
	border-top: 1px solid;
}
#help dd { margin: 5px 35px; }
#help .infos { padding-left: 0; }
#help h1, #help h2 { margin-top: 0; }
#help > div div {
	width: 50%;
	float: left;
	padding: 0 20px 20px 17px;;
}

.item-info .stab {
	display: table;
}
.stab {
	border-width: 1px;
	border-style: solid;
	padding: 3px;
	margin-bottom: 5px;
	font-size: 90%;
	font-weight: normal;
}
.stab p {
	display: inline;
}

.stab .emoji {
	font-size: 1.5em;
}

/* Black one-pixel outline around emoji shapes */
.emoji {
	text-shadow:
		1px 0 0 black,
		-1px 0 0 black,
		0  1px 0 black,
		0 -1px 0 black;
}

.module-item .stab,
.import-item .stab {
	border-radius: 3px;
	display: inline-block;
	font-size: 80%;
	line-height: 1.2;
	margin-bottom: 0;
	margin-left: .3em;
	padding: 2px;
	vertical-align: text-bottom;
}

.module-item.unstable,
.import-item.unstable {
	opacity: 0.65;
}

.since {
	font-weight: normal;
	font-size: initial;
}

.impl-items .since, .impl .since, .methods .since {
	padding-left: 12px;
	padding-right: 2px;
	position: initial;
}

.impl-items .srclink, .impl .srclink, .methods .srclink {
	/* Override header settings otherwise it's too bold */
	font-size: 17px;
	font-weight: normal;
}

.rightside {
	float: right;
}

.has-srclink {
	font-size: 16px;
	margin-bottom: 12px;
	/* Push the src link out to the right edge consistently */
	justify-content: space-between;
}

.variants_table {
	width: 100%;
}

.variants_table tbody tr td:first-child {
	width: 1%; /* make the variant name as small as possible */
}

td.summary-column {
	width: 100%;
}

.summary {
	padding-right: 0px;
}

pre.rust .question-mark {
	font-weight: bold;
}

a.test-arrow {
	display: inline-block;
	position: absolute;
	padding: 5px 10px 5px 10px;
	border-radius: 5px;
	font-size: 130%;
	top: 5px;
	right: 5px;
	z-index: 1;
}
a.test-arrow:hover{
	text-decoration: none;
}

.section-header:hover a:before {
	position: absolute;
	left: -25px;
	padding-right: 10px; /* avoid gap that causes hover to disappear */
	content: '\2002\00a7\2002';
}

.section-header:hover a {
	text-decoration: none;
}

.section-header a {
	color: inherit;
}

.code-attribute {
	font-weight: 300;
}

.since + .srclink {
	padding-left: 10px;
}

.item-spacer {
	width: 100%;
	height: 12px;
}

.out-of-band > span.since {
	position: initial;
	font-size: 20px;
	margin-right: 5px;
}

.sub-variant, .sub-variant > h3 {
	margin-top: 0px !important;
	padding-top: 1px;
}

#main .sub-variant > h3 {
	font-size: 15px;
	margin-left: 25px;
	margin-bottom: 5px;
}

.sub-variant > div {
	margin-left: 20px;
	margin-bottom: 10px;
}

.sub-variant > div > span {
	display: block;
	position: relative;
}

.toggle-label {
	display: inline-block;
	margin-left: 4px;
	margin-top: 3px;
}

.docblock > .section-header:first-child {
	margin-left: 15px;
	margin-top: 0;
}

.docblock > .section-header:first-child:hover > a:before {
	left: -10px;
}

:target > code, :target > .code-header {
	opacity: 1;
}

:target {
	padding-right: 3px;
}

.information {
	position: absolute;
	left: -25px;
	margin-top: 7px;
	z-index: 1;
}

.tooltip {
	position: relative;
	display: inline-block;
	cursor: pointer;
}

.tooltip::after {
	display: none;
	text-align: center;
	padding: 5px 3px 3px 3px;
	border-radius: 6px;
	margin-left: 5px;
	font-size: 16px;
}

.tooltip.ignore::after {
	content: "This example is not tested";
}
.tooltip.compile_fail::after {
	content: "This example deliberately fails to compile";
}
.tooltip.should_panic::after {
	content: "This example panics";
}
.tooltip.edition::after {
	content: "This code runs with edition " attr(data-edition);
}

.tooltip::before {
	content: " ";
	position: absolute;
	top: 50%;
	left: 16px;
	margin-top: -5px;
	border-width: 5px;
	border-style: solid;
	display: none;
}

.tooltip:hover::before, .tooltip:hover::after {
	display: inline;
}

.tooltip.compile_fail, .tooltip.should_panic, .tooltip.ignore {
	font-weight: bold;
	font-size: 20px;
}

.notable-traits-tooltip {
	display: inline-block;
	cursor: pointer;
}

.notable-traits:hover .notable-traits-tooltiptext,
.notable-traits .notable-traits-tooltiptext.force-tooltip {
	display: inline-block;
}

.notable-traits .notable-traits-tooltiptext {
	display: none;
	padding: 5px 3px 3px 3px;
	border-radius: 6px;
	margin-left: 5px;
	z-index: 10;
	font-size: 16px;
	cursor: default;
	position: absolute;
	border: 1px solid;
}

.notable-traits-tooltip::after {
	/* The margin on the tooltip does not capture hover events,
	   this extends the area of hover enough so that mouse hover is not
	   lost when moving the mouse to the tooltip */
	content: "\00a0\00a0\00a0";
}

.notable-traits .notable, .notable-traits .docblock {
	margin: 0;
}

.notable-traits .notable {
	margin: 0;
	margin-bottom: 13px;
	font-size: 19px;
	font-weight: 600;
}

.notable-traits .docblock code.content{
	margin: 0;
	padding: 0;
	font-size: 20px;
}

/* Example code has the "Run" button that needs to be positioned relative to the pre */
pre.rust.rust-example-rendered {
	position: relative;
}

pre.rust {
	tab-size: 4;
	-moz-tab-size: 4;
}

.search-failed {
	text-align: center;
	margin-top: 20px;
	display: none;
}

.search-failed.active {
	display: block;
}

.search-failed > ul {
	text-align: left;
	max-width: 570px;
	margin-left: auto;
	margin-right: auto;
}

#titles {
	height: 35px;
}

#titles > button {
	float: left;
	width: 33.3%;
	text-align: center;
	font-size: 18px;
	cursor: pointer;
	border: 0;
	border-top: 2px solid;
}

#titles > button:not(:last-child) {
	margin-right: 1px;
	width: calc(33.3% - 1px);
}

#titles > button > div.count {
	display: inline-block;
	font-size: 16px;
}

.notable-traits {
	cursor: pointer;
	z-index: 2;
	margin-left: 5px;
}

#all-types {
	text-align: center;
	border: 1px solid;
	margin: 0 10px;
	margin-bottom: 10px;
	display: block;
	border-radius: 7px;
}
#all-types > p {
	margin: 5px 0;
}

#sidebar-toggle {
	position: fixed;
	top: 30px;
	left: 300px;
	z-index: 10;
	padding: 3px;
	border-top-right-radius: 3px;
	border-bottom-right-radius: 3px;
	cursor: pointer;
	font-weight: bold;
	transition: left .5s;
	font-size: 1.2em;
	border: 1px solid;
	border-left: 0;
}
#source-sidebar {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	width: 300px;
	z-index: 1;
	overflow: auto;
	transition: left .5s;
	border-right: 1px solid;
}
#source-sidebar > .title {
	font-size: 1.5em;
	text-align: center;
	border-bottom: 1px solid;
	margin-bottom: 6px;
}

.theme-picker {
	position: absolute;
	left: 211px;
	top: 19px;
}

.theme-picker button {
	outline: none;
}

#settings-menu, #help-button {
	position: absolute;
	top: 10px;
}

#settings-menu {
	right: 0;
	outline: none;
}

#theme-picker, #settings-menu, #help-button, #copy-path {
	padding: 4px;
	width: 27px;
	height: 29px;
	border: 1px solid;
	border-radius: 3px;
	cursor: pointer;
}

#help-button {
	right: 30px;
	font-family: "Fira Sans", Arial, sans-serif;
	text-align: center;
	font-size: 17px;
	padding-top: 2px;
}

#copy-path {
	background: initial;
	margin-left: 10px;
	padding: 0;
	padding-left: 2px;
	border: 0;
}

#theme-choices {
	display: none;
	position: absolute;
	left: 0;
	top: 28px;
	border: 1px solid;
	border-radius: 3px;
	z-index: 1;
	cursor: pointer;
}

#theme-choices > button {
	border: none;
	width: 100%;
	padding: 4px 8px;
	text-align: center;
	background: rgba(0,0,0,0);
}

#theme-choices > button:not(:first-child) {
	border-top: 1px solid;
}

kbd {
	display: inline-block;
	padding: 3px 5px;
	font: 15px monospace;
	line-height: 10px;
	vertical-align: middle;
	border: solid 1px;
	border-radius: 3px;
	box-shadow: inset 0 -1px 0;
	cursor: default;
}

.hidden-by-impl-hider,
.hidden-by-usual-hider {
	/* important because of conflicting rule for small screens */
	display: none !important;
}

#implementations-list > h3 > span.in-band {
	width: 100%;
}

.table-display {
	width: 100%;
	border: 0;
	border-collapse: collapse;
	border-spacing: 0;
	font-size: 16px;
}

.table-display tr td:first-child {
	padding-right: 0;
}

.table-display tr td:last-child {
	float: right;
}
.table-display .out-of-band {
	position: relative;
	font-size: 19px;
	display: block;
}
#implementors-list > .impl-items .table-display .out-of-band {
	font-size: 17px;
}

.table-display td:hover .anchor {
	display: block;
	top: 2px;
	left: -5px;
}

#main > ul {
	padding-left: 10px;
}
#main > ul > li {
	list-style: none;
}

.non-exhaustive {
	margin-bottom: 1em;
}

div.children {
	padding-left: 27px;
	display: none;
}
div.name {
	cursor: pointer;
	position: relative;
	margin-left: 16px;
}
div.files > a {
	display: block;
	padding: 0 3px;
}
div.files > a:hover, div.name:hover {
	background-color: #a14b4b;
}
div.name.expand + .children {
	display: block;
}
div.name::before {
	content: "\25B6";
	padding-left: 4px;
	font-size: 0.7em;
	position: absolute;
	left: -16px;
	top: 4px;
}
div.name.expand::before {
	transform: rotate(90deg);
	left: -15px;
	top: 2px;
}

/* The hideme class is used on summary tags that contain a span with
	placeholder text shown only when the toggle is closed. For instance,
	"Expand description" or "Show methods". */
details.rustdoc-toggle > summary.hideme {
	cursor: pointer;
}

details.rustdoc-toggle > summary, details.undocumented > summary {
	list-style: none;
}
details.rustdoc-toggle > summary::-webkit-details-marker,
details.rustdoc-toggle > summary::marker,
details.undocumented > summary::-webkit-details-marker,
details.undocumented > summary::marker {
	display: none;
}

details.rustdoc-toggle > summary.hideme > span {
	margin-left: 9px;
}

details.rustdoc-toggle > summary::before {
	content: "";
	cursor: pointer;
	width: 17px;
	height: max(17px, 1.1em);
	background-repeat: no-repeat;
	background-position: top left;
	display: inline-block;
	vertical-align: middle;
	opacity: .5;
}

/* Screen readers see the text version at the end the line.
	Visual readers see the icon at the start of the line, but small and transparent. */
details.rustdoc-toggle > summary::after {
	content: "Expand";
	overflow: hidden;
	width: 0;
	height: 0;
	position: absolute;
}

details.rustdoc-toggle > summary.hideme::after {
	/* "hideme" toggles already have a description when they're contracted */
	content: "";
}

details.rustdoc-toggle > summary:focus::before,
details.rustdoc-toggle > summary:hover::before {
	opacity: 1;
}

details.rustdoc-toggle.top-doc > summary,
details.rustdoc-toggle.top-doc > summary::before,
details.rustdoc-toggle.non-exhaustive > summary,
details.rustdoc-toggle.non-exhaustive > summary::before {
	font-family: 'Fira Sans';
	font-size: 16px;
}

details.non-exhaustive {
	margin-bottom: 8px;
}

details.rustdoc-toggle > summary.hideme::before {
	position: relative;
}

details.rustdoc-toggle > summary:not(.hideme)::before {
	position: absolute;
	left: -23px;
	top: 3px;
}

.impl-items > details.rustdoc-toggle > summary:not(.hideme)::before,
.undocumented > details.rustdoc-toggle > summary:not(.hideme)::before {
	position: absolute;
	left: -2px;
}

/* When a "hideme" summary is open and the "Expand description" or "Show
	methods" text is hidden, we want the [-] toggle that remains to not
	affect the layout of the items to its right. To do that, we use
	absolute positioning. Note that we also set position: relative
	on the parent <details> to make this work properly. */
details.rustdoc-toggle[open] > summary.hideme {
	position: absolute;
}

details.rustdoc-toggle, details.undocumented {
	position: relative;
}

details.rustdoc-toggle[open] > summary.hideme > span {
	display: none;
}

details.rustdoc-toggle[open] > summary::before,
details.rustdoc-toggle[open] > summary.hideme::before {
	width: 17px;
	height: max(17px, 1.1em);
	background-repeat: no-repeat;
	background-position: top left;
	display: inline-block;
	content: "";
}

details.rustdoc-toggle[open] > summary::after,
details.rustdoc-toggle[open] > summary.hideme::after {
	content: "Collapse";
}

details.undocumented > summary::before {
	padding-left: 17px;
	height: max(17px, 1.1em);
	background-repeat: no-repeat;
	background-position: top left;
	content: "Show hidden undocumented items";
	cursor: pointer;
	font-size: 16px;
	font-weight: 300;
	opacity: .5;
}

details.undocumented > summary:focus::before,
details.undocumented > summary:hover::before {
	opacity: 1;
}

details.undocumented[open] > summary::before {
	padding-left: 17px;
	height: max(17px, 1.1em);
	background-repeat: no-repeat
	background-position: top left;
	content: "Hide undocumented items";
}

/* Media Queries */

@media (min-width: 701px) {
	/* In case there is no documentation before a code block, we need to add some margin at the top
	to prevent an overlay between the "collapse toggle" and the information tooltip.
	However, it's not needed with smaller screen width because the doc/code block is always put
	"one line" below. */
	.docblock > .information:first-child > .tooltip {
		margin-top: 16px;
	}
}

@media (max-width: 700px) {
	body {
		padding-top: 0px;
	}

	.rustdoc > .sidebar {
		height: 45px;
		min-height: 40px;
		margin: 0;
		margin-left: -15px;
		padding: 0 15px;
		position: static;
		z-index: 11;
	}

	.sidebar > .location {
		float: right;
		margin: 0px;
		margin-top: 2px;
		padding: 3px 10px 1px 10px;
		min-height: 39px;
		background: inherit;
		text-align: left;
		font-size: 24px;
	}

	.sidebar .location:empty {
		padding: 0;
	}

	.sidebar .logo-container {
		width: 35px;
		height: 35px;
		margin-top: 5px;
		margin-bottom: 5px;
		float: left;
		margin-left: 50px;
	}

	.sidebar .logo-container > img {
		max-width: 35px;
		max-height: 35px;
	}

	.sidebar-menu {
		position: fixed;
		z-index: 10;
		font-size: 2rem;
		cursor: pointer;
		width: 45px;
		left: 0;
		text-align: center;
		display: block;
		border-bottom: 1px solid;
		border-right: 1px solid;
		height: 45px;
	}

	.rustdoc.source > .sidebar > .sidebar-menu {
		display: none;
	}

	/* We do NOT hide this element so that alternative device readers still have this information
	   available. */
	.sidebar-elems {
		position: fixed;
		z-index: 1;
		top: 45px;
		bottom: 0;
		width: 246px;
		/* We move the sidebar to the left by its own width so it doesn't appear. */
		left: -246px;
		overflow-y: auto;
		border-right: 1px solid;
	}

	.sidebar > .block.version {
		overflow: hidden;
		border-bottom: none;
		margin-bottom: 0;
		height: 100%;
		padding-left: 12px;
	}
	.sidebar > .block.version > div.narrow-helper {
		float: left;
		width: 1px;
		height: 100%;
	}
	.sidebar > .block.version > p {
		/* hide Version text if too narrow */
		margin: 0;
		min-width: 55px;
		/* vertically center */
		display: flex;
		align-items: center;
		height: 100%;
	}

	nav.sub {
		width: calc(100% - 32px);
		float: right;
	}

	.content {
		margin-left: 0px;
	}

	#main, #search {
		margin-top: 45px;
		padding: 0;
	}

	#search {
		margin-left: 0;
	}

	.anchor {
		display: none !important;
	}

	.theme-picker {
		left: 10px;
		top: 54px;
		z-index: 1;
	}

	.notable-traits {
		position: absolute;
		left: -22px;
		top: 24px;
	}

	#titles > button > div.count {
		float: left;
		width: 100%;
	}

	#titles {
		height: 50px;
	}

	.sidebar.mobile {
		position: fixed;
		width: 100%;
		margin-left: 0;
		background-color: rgba(0,0,0,0);
		height: 100%;
	}
	/*
	This allows to prevent the version text to overflow the sidebar title on mobile mode when the
	sidebar is displayed (after clicking on the "hamburger" button).
	*/
	.sidebar.mobile > div.version {
		overflow: hidden;
		max-height: 33px;
	}
	.sidebar {
		width: calc(100% + 30px);
	}

	.show-it, .sidebar-elems:focus-within {
		z-index:  2;
		left: 0;
	}

	.show-it > .block.items {
		margin: 8px 0;
	}

	.show-it > .block.items > ul {
		margin: 0;
	}

	.show-it > .block.items > ul > li {
		text-align: center;
		margin: 2px 0;
	}

	.show-it > .block.items > ul > li > a {
		font-size: 21px;
	}

	/* Because of ios, we need to actually have a full height sidebar title so the
	 * actual sidebar can show up. But then we need to make it transparent so we don't
	 * hide content. The filler just allows to create the background for the sidebar
	 * title. But because of the absolute position, I had to lower the z-index.
	 */
	#sidebar-filler {
		position: fixed;
		left: 45px;
		width: calc(100% - 45px);
		top: 0;
		height: 45px;
		z-index: -1;
		border-bottom: 1px solid;
	}

	#main > details.rustdoc-toggle > summary::before,
	#main > div > details.rustdoc-toggle > summary::before {
		left: -11px;
	}

	#all-types {
		margin: 10px;
	}

	#sidebar-toggle {
		top: 100px;
		width: 30px;
		font-size: 1.5rem;
		text-align: center;
		padding: 0;
	}

	#source-sidebar {
		z-index: 11;
	}

	#main > .line-numbers {
		margin-top: 0;
	}

	.notable-traits .notable-traits-tooltiptext {
		left: 0;
		top: 100%;
	}

	/* We don't display the help button on mobile devices. */
	#help-button {
		display: none;
	}

	/* Display an alternating layout on tablets and phones */
	.item-table {
		display: flex;
		flex-flow: column wrap;
	}
	.item-left, .item-right {
		width: 100%;
	}

	.search-container > div {
		width: calc(100% - 32px);
	}

	/* Display an alternating layout on tablets and phones */
	.search-results > a {
		border-bottom: 1px solid #aaa9;
		padding: 5px 0px;
	}
	.search-results .result-name, .search-results div.desc, .search-results .result-description {
		width: 100%;
	}
	.search-results div.desc, .search-results .result-description, .item-right {
		padding-left: 2em;
	}
}

@media print {
	nav.sub, .content .out-of-band {
		display: none;
	}
}

@media (max-width: 464px) {
	#titles, #titles > button {
		height: 73px;
	}

	/* This is to prevent the search bar from being underneath the <section>
	 * element following it.
	 */
	#main, #search {
		margin-top: 100px;
	}

	#main > table:not(.table-display) td {
		word-break: break-word;
		width: 50%;
	}

	.search-container > div {
		display: block;
		width: calc(100% - 37px);
	}

	#crate-search {
		width: 100%;
		border-radius: 4px;
		border: 0;
	}

	#crate-search + .search-input {
		width: calc(100% + 71px);
		margin-left: -36px;
	}

	#theme-picker, #settings-menu {
		padding: 5px;
		width: 31px;
		height: 31px;
	}

	#theme-picker {
		margin-top: -2px;
	}

	#settings-menu {
		top: 7px;
	}

	.docblock {
		margin-left: 12px;
	}
}
